package cn.ds.fly.modules.sys.entity;

import cn.ds.fly.common.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * Created by lds on 2017/12/14.
 * @author lds
 */
@Data
@Table(name = "fly_dept")
@NoArgsConstructor
@AllArgsConstructor
public class FlyDept extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 6938024580724667263L;

    /**上级部门ID，一级部门为0*/
    @Column(name = "parent_id")
    private String parentId;
    /**部门名称*/
    private String name;

    @Transient
    /**上级部门名称*/
    private String parentName;
    /**排序*/
    @Column(name = "order_num")
    private Integer orderNum;
    /**
     * zTree属性
     */
    @Transient
    private Boolean open;
}
